Name:
reverse -- print reverse (background and foreground colors exchanged)
Synopsis:
*** requires ncurses support compiled in ***
See Documentation/Advanced for info.
clear screen
...
print reverse "foo"
Description:
reverse may be used to print text in reverse. reverse is not a seperate command, but part of the print-command; it may be included just after the print and can only be issued once that clear screen has been issued.
Example:
clear screen
print "1 "
c=3
do
prim=true
for a=2 to sqrt(c)
if (frac(c/a)=0) then
prim=false
break
endif
next a
if (prim) then
print
print reverse c;
else
print c;
endif
print " "
c=c+1
loop
Explanation:
This program prints numbers from 1 on and marks each prime number in reverse.
Start this program in a terminal.
Related: at, color, print, clear screen